<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #nav{
            width: 900px;
            margin: 0 auto;
            height: 60px;
        }
        #nav > ul{
            height: 60px;
            list-style: none;
            display: flex;
            justify-content: space-between;
            padding: 0;
            border-bottom: 1px solid #bfbfbf;
        }
        /* 如果要修改背景颜色，此处也要改 */
        #nav > ul > li {
            height: 60px;
            line-height: 60px;
            display: block;
            width: 175px;
            text-align: center;
            background-color: white;
            position: relative;
        }

        #nav > ul > li:hover{
            border: 1px solid #bfbfbf;
            border-bottom: none;
        }
        #nav > ul > li> .sec_nav{
            position: absolute;
            list-style: none;
            border: 1px solid #bfbfbf;
            border-top: none;
            top: 60px;
            padding: 0;
            width: 175px;
            left: -1px;
            display: none;
        }
        #nav > ul > li> .sec_nav > li:hover{
            background-color: #afb0b2;
            border-radius: 4px;
        }

        #nav > ul > li:hover > .sec_nav{
            display: block;
        }

        #nav > ul > li> .sec_nav > li > a{
            text-decoration: none;
            color: #000;
            display: block;
            width: 100%;
            height: 100%;
        }

    </style>
</head>
<body>
    <div id="nav">
        <ul>
            <li>
                <span>home</span>
                <ul class="sec_nav">
                    <li><a href="#">shuai</a></li>
                    <li><a href="#">about us</a></li>
                    <li><a href="#">boge</a></li>
                    <li><a href="#">wudiboge</a></li>
                </ul>
            </li>
            <li><span>shuai</span>
                <ul class="sec_nav">
                    <li><a href="#">shuai</a></li>
                    <li><a href="#">about us</a></li>
                    <li><a href="#">boge</a></li>
                    <li><a href="#">wudiboge</a></li>
                </ul>
            </li>
            <li><span>about us</span></li>
            <li><span>boge</span></li>
            <li><span>wudiboge</span></li>
        </ul>
    </div>
</body>
</html>